<section>
  <!-- main content start-->
  <div class="main-content" >
    <form [formGroup]="camForm" id="documentForm"  class="form-horizontal">
      <!-- header section end-->
      <div class="panel-body" style="margin-bottom: -15px;">
        <span>
          <!--<i class="fa fa-2x fa-long-arrow-left" (click)="comeBack()" id="btn_back" ></i>&nbsp;&nbsp;&nbsp;-->
          <i class="fa fa-2x fa-save" (click)="onSubmit(camForm.value)" id="btn_submit"></i>
       </span>
      </div>
      <!--body wrapper start-->
      <div class="wrapper">
        <div class="row">
          <div class="col-md-12">
            <section class="panel">
              <div class="panel-body">

                <div class="form-group">
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;主题</label>
                  <div class="col-md-10 col-xs-12">
                    <input readonly formControlName="subject" type="text" class="form-control " id="subject"/>
                  </div>
                </div>

                <div class="form-group" >
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;用车性质</label>
                  <div class="col-md-5">
                    <input readonly formControlName="purpose" type="text" class="form-control " id="purpose"/>
                  </div>
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;同乘人数</label>
                  <div class="col-md-4">
                    <input readonly formControlName="passengerNum" class="form-control" type="text" id="passengerNum" />
                  </div>
                </div>

                <div class="form-group">
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;开始时间</label>
                  <div class="col-md-5 col-xs-12">
                    <input readonly formControlName="starttime" class="form-control" type="text" id="starttime" />
                  </div>

                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;预计结束时间</label>
                  <div class="col-md-4 col-xs-12">
                    <input readonly formControlName="endtime" class="form-control" type="text" id="endtime" />
                  </div>
                </div>

                <div class="form-group" >
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;联系人</label>
                  <div class="col-md-5">
                    <input readonly formControlName="contact" class="form-control" type="text" id="contact" />
                  </div>
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;手机号码</label>
                  <div class="col-md-4">
                    <input readonly formControlName="phone" class="form-control" type="text" id="phone" />
                  </div>
                </div>

                <div class="form-group" >
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;出发地</label>
                  <div class="col-md-5">
                    <input readonly formControlName="startpoint" id="startpoint" type="text" class="form-control">
                  </div>
                  <label class="control-label col-md-1"><span class="necessary">*</span>&nbsp;目的地</label>
                  <div class="col-md-4">
                    <input readonly formControlName="endpoint" id="endpoint" type="text" class="form-control" >
                  </div>
                </div>

                <div class="form-group" >
                  <label class="control-label col-md-1">是否同意拼车</label>
                  <div class="col-md-5 col-xs-12">
                    <input formControlName="shared" type="checkbox" id="shared" disabled="true">
                  </div>
                </div>

                <div class="form-group">
                  <label class="col-md-1 control-label">事由</label>
                  <div class="col-md-10">
                    <textarea readonly formControlName="reason" class="form-control textareastyle" id="reason" ></textarea>
                  </div>

                </div>

                <div class="form-group" >
                  <label class="col-md-1 control-label">同乘人员</label>
                  <div class="col-md-10">
                    <input type="hidden" formControlName="passengers" id="passengers">
                    <textarea readonly formControlName="res01" class="form-control textareastyle" id="res01" ></textarea>
                  </div>
                </div>

                <div class="form-group">
                  <label class="col-md-1 control-label">申请备注</label>
                  <div class="col-md-10">
                    <textarea readonly formControlName="description" class="form-control textareastyle" id="description"></textarea>
                  </div>
                </div>
                <div class="form-group">
                  <label class="control-label col-md-1">附件</label>
                  <div class="col-md-10 col-xs-12">
                    <table class="table table-striped table-hover table-bordered">
                      <thead>
                      <tr class="table_title">
                        <th width="80%" >文件名称</th>
                        <th width="20%">文件大小</th>
                      </tr>
                      </thead>
                      <tbody>
                      <tr *ngFor="let file of fileList"  class="table_body">
                        <td>
                          <strong><a href="{{ file?.filePath }}" >{{ file?.name }}</a></strong>
                        </td>
                        <td>{{ file?.filesize/1024/1024 | number:'.2' }} MB</td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
            </section>
          </div>
        </div>
        <div class="row" style="margin-top: 30px;">
          <div class="col-lg-12">
            <section class="panel">
              <header class="panel-heading">
                车辆信息
              </header>

              <div class="panel-body">


                <div class="col-lg-6">
                  <div class="form-group">
                    <label  ><span class="necessary">*</span>&nbsp;车辆</label>
                    <div class="input-group  ">
                      <input formControlName="car" type="hidden" class="form-control " id="car"/>
                      <input readonly formControlName="carName" class="form-control" type="text" id="carName" />
                      <span class="input-group-btn" >
                            <button id="btn_select_vehicle" type="button" class="btn btn-default" style="background: #424F63;color: #fff;" (click)="btn_select_vehicle()" >
                                <i class="fa fa-angle-down"></i>
                            </button>
                    </span>
                    </div>
                  </div>
                  <div class="form-group">
                    <label  >车辆类别</label>
                    <input readonly formControlName="vehicleType" class="form-control" type="hidden" id="vehicleType" />
                    <input readonly formControlName="vehicleTypeName" class="form-control" type="text" id="vehicleTypeName" />
                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="form-group" >
                    <label  >车牌号</label>
                    <input readonly formControlName="licenseNumber" id="licenseNumber" type="text" class="form-control" >
                  </div>
                  <div class="form-group">
                    <label  >额定载客数</label>
                    <input readonly formControlName="passengerCapacity" id="passengerCapacity" type="text"  class="form-control">
                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="form-group">
                    <label  ><span class="necessary">*</span>&nbsp;司机姓名</label>
                    <div class="input-group  ">
                      <input formControlName="driver" type="hidden" class="form-control " id="driver"/>
                      <input readonly formControlName="driverName" class="form-control" type="text" id="driverName" />
                      <span class="input-group-btn" >
                        <button id="btn_select_driver" type="button" class="btn btn-default" style="background: #424F63;color: #fff;" (click)="btn_select_driver()" >
                            <i class="fa fa-angle-down"></i>
                        </button>
                    </span>
                    </div>

                  </div>
                </div>
                <div class="col-lg-6">
                  <div class="form-group" >
                    <label  >司机电话</label>
                    <input readonly formControlName="driverPhone" type="text" class="form-control " id="driverPhone"/>
                  </div>

                </div>
              </div>
            </section>
          </div>
        </div>
        <!--body wrapper end-->

      </div>
    </form>
  </div>
  <!-- main content end-->
</section>

<!-- 司机开窗modal -->
<nz-modal id="udgModal"  [nzVisible]="driverIsVisible" [nzTitle]="'人员开窗'" [nzContent]="driverModalContent"
          [nzFooter]="false" (nzOnCancel)="driverHandleCancel($event)" >
  <ng-template #driverModalContent>
    <app-driver-table></app-driver-table>
  </ng-template>
</nz-modal>
<!-- modal -->

<!-- 车辆开窗modal -->
<nz-modal id="vehicleModal"  [nzVisible]="vehicleIsVisible" [nzTitle]="'车辆开窗'" [nzContent]="vehicleModalContent"
          [nzFooter]="false" (nzOnCancel)="vehicleHandleCancel($event)" >
  <ng-template #vehicleModalContent>
    <app-vehicle-table></app-vehicle-table>
  </ng-template>
</nz-modal>
<!-- modal -->
